package day0428.homework.factor.singleton;/*
 * @创建者：黄苟苟
 * @创建时间：2021/4/28   21:02
 * @Description描述判断
 **/

public class MainTest {
    public static void main(String[] args) {
        SingleGou gou1 = SingleGou.getInstance();
        SingleGou gou2 = SingleGou.getInstance();
        System.out.println("我们来判断一下gou1与gou2是否是同一个对象");
        System.out.println("结果是:" + (gou1 == gou2));

        SingleGou02 gou3 = SingleGou02.getInstance();
        SingleGou02 gou4 = SingleGou02.getInstance();
        System.out.println("我们来判断一下gou3与gou4是否是同一个对象");
        System.out.println("结果也是:" + (gou3 == gou4));
    }
}

